<?php
require_once('RssConverter.php');
class RssVer2ConverterComponent implements RssConverter{
	
	public function toArticles($rss){
		$articles = array();

		foreach($rss['rss']['channel']['item'] as $item){
			$article = array(
				'title' => $item['title'],	
				'link' => $item['link'],	
				'description' => $item['description'],	
			);
			$articles[] = $article;
		}

		return $articles;
	}
}
?>

